﻿using System;
using MyInterfaces;
using System.ServiceModel;

namespace MyServiceClasses
{
    public class MyService : IMyService
    {
        private static readonly string RIGHT = "right";

        #region IMyService Members

        public string SayHello(string message)
        {
            return string.Format("Hello, you wrote : {0}", message);
        }

        public bool IsThisRight(string direction)
        {
            return RIGHT.Equals(direction.ToLower());
        }

 
        public CBDCommandType UpdateInfo(CBDCommandType commandType)
        {
            return commandType;
        }

        public string EchoMessage(CBDCommandType coomandType)
        {
            if ("HELP".Equals(coomandType.CbdMessage))
            {
                return coomandType.CbdMessage;
            }
            return "Not even close..";
        }

        #endregion
        public void Dispose()
        {
            Console.WriteLine("Disposing....");
        }

   }
}
